

package clientapp;

import java.io.IOException;
import java.io.OutputStream;
import javax.microedition.io.Connector;
import javax.microedition.io.StreamConnection;

/**
 *
 * @author David Roos
 */
public class clientSender implements Runnable {

          private static String connectionURL = "btspp://000A3A65AD37:1";
          private String tekst = "testje vanuit client";

    public void run() {

        StreamConnection conn = null;
        try {
            conn = (StreamConnection) Connector.open(connectionURL);
        } catch (IOException ex) {
            ex.printStackTrace();
        }


                      OutputStream outStream = null;
              byte[] test = tekst.getBytes();
        try {
            outStream = conn.openOutputStream();
                        outStream.write(test);
            outStream.flush();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

}
